/********************************************************************************
 *  
 *  Product: GSAOBKeyMatchesLib
 *  Description: A C# API for Responsing to Google Search Appliance OneBoxModule.
 *
 *  (c) Copyright 2007 
 *  
********************************************************************************/
using System;
using System.Collections;
using System.Text;

namespace GSAOBKeyMatchesLib.Server
{
    /// <summary>
    /// Provides methods to create ModuleResult for Response stream (refer to OneBox Response XML "MODULE RESULT" tag)
    /// <para>Author Albert Ghukasyan</para>
    /// </summary>
    class ModuleResult
    {
        #region Variables

        private String m_text;
        private String m_url;
        private ArrayList m_fields = new ArrayList();

        #endregion

        #region Constructor

        public ModuleResult(String text, String url)
        {
            m_text = text; m_url = url;
        }

        #endregion

        #region Methods

        public void addField(FieldObject field) 
        { 
            m_fields.Add(field); 
        }

        public String getText()
        { 
            return m_text; 
        }

        public String getUrl() 
        { 
            return m_url; 
        }

        public ArrayList getFields() 
        { 
            return m_fields;
        }

        #endregion
    }
}
